package cn.circle.system.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 商品类别表实体类 
 * 对应数据库表：COMMODITY_CATEGORY
 * @author 
 * 时间：
 */
@Entity
@Table(name="COMMODITY_CATEGORY")
@DynamicInsert(true)
@DynamicUpdate(true)
public class CommodityCategory implements Serializable {

	private static final long serialVersionUID = -206287448464978581L;
	//CATEGORY_ID,NAME,SUMMARY,STATUS
	private Integer categoryId;
	private String name;
	private String summary;
	private Byte status;
	
	@Id
	@Column(name = "CATEGORY_ID",unique = true,nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)		//自增长
	public Integer getCategoryId() {
		return categoryId;
	}
	public void setCategoryId(Integer categoryId) {
		this.categoryId = categoryId;
	}
	/*@NotEmpty(message="类别名称不能为空！")*/
	@Column(name = "NAME",unique = true,nullable = false)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name = "SUMMARY")
	public String getSummary() {
		return summary;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}
	
	@Column(name = "STATUS",columnDefinition = "tinyint default 9")
	public Byte getStatus() {
		return status;
	}
	public void setStatus(Byte status) {
		this.status = status;
	}
	
	
	
	
	
	
	
}
